//
//  ZpStatus.m
//  WeiBo_OC
//
//  Created by MacBook Pro on 16/5/30.
//  Copyright © 2016年 MacBook Pro. All rights reserved.
//

#import "ZpStatus.h"
#
@implementation ZpStatus

+ (instancetype)statusWithDict:(NSDictionary *)dict{

    ZpStatus *status = [[ZpStatus alloc] initWithDict:dict];
    return status;
}

- (instancetype) initWithDict:(NSDictionary *)dict{
    if (self = [self init]) {
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{

}

- (void)setUser:(NSDictionary *)user{
 _user = [[ZpUser alloc] initWithDict:user];
}

- (void)setPic_urls:(NSArray *)pic_urls{
    NSMutableArray *arrM = [NSMutableArray array];
    for (NSDictionary *dict in pic_urls){
        ZpPicture *picture = [[ZpPicture alloc] initWithString:dict[@"thumbnail_pic"]];
        [arrM addObject:picture];
    }
    _pic_urls = arrM;
}

- (void)setRetweeted_status:(NSDictionary *)retweeted_status
{
    _retweeted_status = [[ZpStatus alloc] initWithDict:retweeted_status];
}

@end
